Change the menu of Local Server(LocalMain.exe)

 

The text menu of the Local Server can be changed to the desired menu according to the settings.

The menu that can be used as a Local Server's menu can be used by selecting from the following contents.

 

1) Main Menu of the Local Server

2) Written with Menu Script, MENU_SCRIPT_000 ~ MENU_SCRIPT_999.

Text Menu Sub Menu

Main Menu Text

Menu Name

File  

Log In(&I)...

LOGIN

 

Log Out(&O)

LOGOUT

 

-------

SEPARATOR

 

Write Memo(&W)...

SEND_MAIL

 

Read Memo(&R)...

READ_MAIL

 

-------

SEPARATOR

 

Print Screen(&P)...

PRINT_SCREEN

 

Screen Save(&S)...

SAVE_SCREEN

 

Save Selection Zone(&C)...

SAVE_SCREEN_ZONE

 

-------

SEPARATOR

 

Run Studio(&E)

RUN_STUDIO

 

-------

SEPARATOR

 

Exit(&X)

EXIT

View  

Graphics(&G)

VIEW_GRAPHIC

 

Entire Tags(&T)

VIEW_ALLTAG_LIST

 

Analog Inputs(&A)

VIEW_ANALOG_INPUT

 

Analog Outputs(&N)

VIEW_ANALOG_OUTPUT

 

Digital Inputs(&D)

VIEW_DIGITAL_INPUT

 

Digital Outputs(&O)

VIEW_DIGITAL_OUTPUT

 

String Tags(&S)

VIEW_STRING_TAG

 

Registered Groups(&R)

VIEW_GROUP_SHOW

 

-------

SEPARATOR

 

Alarm Files(&E)

VIEW_ALARM

 

Alarm Events(&W)

VIEW_ALARM_EVENT_BOX

 

Log Files(&L)

VIEW_LOG

 

-------

SEPARATOR

 

Scripts(&P)

VIEW_PCL

 

Communication Server(&B)

VIEW_SCANBUF

 

Reports(&T)

VIEW_REPORT

 

-------

SEPARATOR

 

Demand Controls(&C)

VIEW_DEMAND_CONTROL

 

Mili-Datas(&M)

VIEW_MILLI_DATA

 

Schedules(&H)

VIEW_SCHEDULE

 

DB Integrations(&I)

VIEW_DB_ADDITION

 

-------

SEPARATOR

 

Navigation(&V)

VIEW_NAVIGATOR

Config  

Alarm(&A)...

CONFIG_ALARM

Colors(&C)

Basic Colors(&T)...

CONFIG_COLOR

Alarm Colors(&A)...

CONFIG_ALARM_COLOR

 

Data(&D)...

CONFIG_DATA

 

Users(&U)...

CONFIG_USER

 

Other(&C)...

CONFIG_ETC

 

Excel Path(&E)

CONFIG_EXCEL_PATH

 

-------

SEPARATOR

Database(&B)

Connection String(&C)

CONFIG_DSN

Shared Database(&H)

CONFIG_SHARED_DATABASE

Schedules(&H)

Year Fixed Schedules&Y)

CONFIG_SCHEDULE_FIXED

Year Additional Schedule(&A)

CONFIG_SCHEDULE_ADDITIONAL

-------

SEPARATOR

Models(&M)

CONFIG_SCHEDULE_MODEL

Weekly Schedules(&W)

CONFIG_SCHEDULE_WEEK

 

Automatic Report Print(&R)

CONFIG_REPORT_AUTO_PRINT

Window  

Cascade(&C)

WINDOW_CASCADE

 

Tile Horinzontally(&H)

WINDOW_TILE_HORZ

 

Tile vertically(&V)

WINDOW_TILE_VERT

 

Arrange Icons&A)

WINDOW_ARRANGE

 

Close(&L)

WINDOW_CLOSE

 

Close All(&O)

WINDOW_CLOSEALL

Help  

Help&H)

HELP

 

-------

SEPARATOR

 

UserName(&U)?

WHOAMI

 

Keylock Information(&K)

KEYLOCK_INFO

 

-------

SEPARATOR

 

System Information(&A)

ABOUT

 

To change the menu, follow the steps below.

1. Create a directory named Menu within your working directory. Then, copy the StartUp.MNUX file from the contents of the AutoBase directory and copy it into the Menu directory in your working directory.

2. If you open the StartUp.MNUX file under the Working Directory|Menu in WordPad or Notepad, the <Figure 1> contents of the menu on the existing watch screen will be recorded, as shown below.

<Figure 1> StartUp.MNUX

 

If you look at the contents that start with 'BEGIN' in the <Figure 1>, you will see that the contents of the menu bar of the existing Local-Server are the same, and the contents of the MENUITEM are the same as the existing contents.

 

For example,

At the 'View' menu

MENUITEM, ¡±&Graphics",        VIEW_GRAPHIC,        ,Ctrl1

 

The role of this menu is to go to the StartUp.Modx file( initialization page ). At this time, if the user wants to put the 'Initial Window' instead of 'Graphics', you can replace the 'Graphics' text with 'Initial Window', save it, and run the LocalMain.exe.

<Figure 3> and <Figure 4> below show the illustrations before and after the fix.

<Figure 2> Screen before modification

 

<Figure 3> Screen after modification

 

Alternatively, if you want to get rid of the graphic menu, you can delete 'MENUITEM, ¡±&Graphics",        VIEW_GRAPHIC,        ,Ctrl1'.

 

By doing the above, you will be able to add/delete/modify the contents of the existing menu.

 

3. Next, I will not deal with the contents of an existing menu, but explain how to add a 'menu script' to a menu.
     In order to add a 'menu script' as a menu, the contents of the 'menu script' must be written. (You need to write a menu script to define what kind of execution you want to do.)

 

 For example, let's say you switch to a module for any power grid (let's say the file name of the grid screen is PowerFlow.Modx)

 

In the ¡®Studio|File|Scirpt|Menu Script¡¯,  write the following:

@LoadModule("PowerFlow.Modx") ;

 

The important thing here is that the MENU_SCRIPT_00 is the ID when setting the menu.

 

After writing the above, write the following In the working_directory|Menu|StartUp.Mnux.

If you want to add a new menu title, write the following:

<Figure 4> Add a new menu

 

 As shown in the <Figure 4>, if you want to make a menu called 'Power Grid Chart' with the menu title '&User Menu' menu, use the following:

 

POPUP, "&User Menu"
BEGIN
MENUITEM, "&Power Grid Chart",     MENU_SCRIPT_00
END

 

The MENU_SCRIPT_00 here is the title of the menu script you wrote above.

If you run the LocalMain.exe again after creating and saving the above, you will see that the menu you created has <Figure 5>been added as shown below.

<Figure 5> Screen after user menu is added

 

*Here, the content that is executed by the menu script can use any of the supported script functions.